#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int main(void) {
	int n;
	scanf("%d", &n);
	while (n--) {
		double x1, y1, x2, y2;
		scanf("%lf%lf%lf%lf", &x1, &y1, &x2, &y2);
		double dx = x1 - x2, dy = y1 - y2;
		printf("%.2f\n", sqrt(dx * dx + dy * dy));
	}
	return EXIT_SUCCESS;
}
